package edu.pku.sei.mte.mtemodel.basictypes;

import edu.pku.sei.mte.mtemodel.core.DataType;
import edu.pku.sei.mte.utilities.Visitor;

public abstract class PrimitiveType implements DataType {

	@Override
	public Object accept(Visitor visitor) {
		return visitor.visitPrimitiveType(this);
	}

	public boolean isPrimitive() {
		return true;
	}
	
	@Override
	public String toString() {
		return getName();
	}
	
	abstract public Object toValue(String text);

	public final static StringType TYPE_STRING = new StringType();
	public final static IntegerType TYPE_INTEGER = new IntegerType();
	public final static BooleanType TYPE_BOOLEAN = new BooleanType();
}
